package it.virtuscarroccio.com.service.impl;

import it.virtuscarroccio.com.dao.CustomTeamDAO;
import it.virtuscarroccio.com.dao.TeamDAO;
import it.virtuscarroccio.com.model.Team;
import it.virtuscarroccio.com.service.TeamManager;

import java.util.List;

public class TeamManagerImpl implements TeamManager{

	private TeamDAO teamDao;
	private CustomTeamDAO customTeamDAO;
	
	public void setTeamDao(TeamDAO teamDao) {
		this.teamDao = teamDao;
	}
	
	public void setCustomTeamDao(CustomTeamDAO customTeamDAO) {
		this.customTeamDAO = customTeamDAO;
	}

	@SuppressWarnings("unchecked")
	public List<Team> getAllTeams() {
		return teamDao.selectByExample(null);
	}
	
	public List<Team> getTeamsByCurrentSeason() {
		return customTeamDAO.getTeamsByCurrentSeason();
	}

	

	
	
	
}
